package com.linln.admin.workOrder.validator;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author 小懒虫
 * @date 2021/04/04
 */
@Data
public class WorkOrderValid implements Serializable {
    @NotEmpty(message = "工单名称不能为空")
    private String title;
    @NotEmpty(message = "生产工单编号不能为空")
    private String work_order_no;
    @NotNull(message = "下单时间不能为空")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date confirm_date;
    @NotNull(message = "跟单经理不能为空")
    private Long follow_by;
    @NotNull(message = "计划生产开始日期不能为空")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date plan_start_date;
    @NotNull(message = "计划生产结束日期不能为空")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date plan_end_date;
}